home *** CD-ROM | disk | FTP | other *** search
/ Word Play Farm / Word Play Farm.iso / pc / movies / shared.dxr / 00511_Crossword Section Handlers.ls < prev    next >
Encoding:
Text File  |  1996-07-29  |  942 b   |  35 lines

  1. on InitSection Num
  2.   global gUserData, gSectNum, gRewardMovie, gSectData, wordlist, gInPuzzle
  3.   set gInPuzzle to 1
  4.   set gSectNum to CalcSectData(Num)
  5.   set lSectCfg to RetConfig(Num)
  6.   set audioclip to GetSectAudio(lSectCfg)
  7.   set gRewardMovie to GetSectReward(lSectCfg)
  8.   set wordlist to GetSectList(lSectCfg)
  9.   set lMovieName to GetSectName(lSectCfg)
  10.   if length(audioclip) >= 1 then
  11.     PlayAudio(audioclip)
  12.     holdSound()
  13.   end if
  14.   set gSectData to GetUserData(gSectNum)
  15.   return lMovieName
  16. end
  17.  
  18. on resetPuzzle
  19.   global gLow, gSectData
  20.   set lCount to the number of items in gSectData
  21.   repeat with t = 1 to lCount
  22.     if item t of gSectData = 1 then
  23.       set spritenum to t + gLow - 1
  24.       Swap2ONstate(spritenum)
  25.     end if
  26.   end repeat
  27.   updateStage()
  28. end
  29.  
  30. on Swap2ONstate pSpriteNum
  31.   set castnumber to the castNum of sprite pSpriteNum
  32.   set castname to the name of cast castnumber & ".on"
  33.   SwapSprite(pSpriteNum, castname)
  34. end
  35.